/*
 * 重设浏览器默认样式，修复一些bug
 */
html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

// 内外边距通常让各个浏览器样式的表现位置不同
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, hr, button, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
  margin: 0;
  padding: 0;
}

// html 5
// --------------------------------
// 重设 HTML5 标签 Display in IE6-9 and FF3
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
  display: block;
}

// HTML5 媒体文件跟 img 保持一致
audio, canvas, video {
  .inline-block();
}

// Prevents modern browsers from displaying 'audio' without controls
audio:not([controls]) {
  display: none;
}

// 表单
// --------------------------------
// Font size in all browsers, margin changes, misc consistency
button, input, select, textarea {
  margin: 0;
  font-size: 100%;
  vertical-align: middle;
}

button, input {
  *overflow: visible; // Inner spacing ie IE6/7
  line-height: normal; // FF3/4 have !important on line-height in UA stylesheet
}

button::-moz-focus-inner, input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
  padding: 0;
  border: 0;
}

button, input[type="button"], input[type="reset"], input[type="submit"] {
  cursor: pointer; // Cursors on all buttons applied consistently
  -webkit-appearance: button; // Style clickable inputs in iOS
}

textarea {
  overflow: auto; // Remove vertical scrollbar in IE6-9
  vertical-align: top; // Readability and alignment cross-browser
}

// table
// --------------------------------
// 去掉各Table  cell 的边距并让其边重合
table {
  max-width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

// IE bug fixed: th 不继承 text-align
th {
  text-align: inherit;
}

// link
// --------------------------------
a {
  &:hover, &:active {
    outline: 0;
  }
}

// 一致的样式
// --------------------------------
// 统一上标和下标
sub, sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sup {
  top: -0.5em;
}

sub {
  bottom: -0.25em;
}

del {
  text-decoration: line-through;
}

address, caption, cite, code, dfn, em, th, var {
  font-style: normal;
  font-weight: 500;
}

// other
// --------------------------------
// 去除默认边框
fieldset, img {
  border: 0;
}

// ie6 7 8(q) bug 显示为行内表现
iframe {
  display: block;
}

// 去掉 firefox 下此元素的边框
abbr, acronym {
  border: 0;
  font-variant: normal;
}

q:before, q:after, blockquote:before, blockquote:after {
  content: "";
}